package server;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Scanner;

public class TratadorDeString implements Runnable {

    private String stringRecebida;
    private String stringEnviada;
    private Scanner input;

    public TratadorDeString(){
        input = new Scanner(System.in);
    }

    public void recebeString(DataInputStream in) throws IOException{
        stringRecebida = in.readUTF();
        System.out.print(stringRecebida+"\n");

    }

    public void enviaString(DataOutputStream out) throws IOException{
        stringEnviada = input.nextLine();
        out.writeUTF(stringEnviada);


    }

    public void run() {
        throw new UnsupportedOperationException("Not supported yet.");
    }


}
